package com.entity;

import java.sql.Timestamp;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * AccpHomework entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "ACCP_HOMEWORK", schema = "ACCP")
public class AccpHomework implements java.io.Serializable {

	// Fields

	private Integer tid;
	private AccpClass accpClass;
	private AccpSubjectitems accpSubjectitems;
	private Short subcount;
	private String unsubname;
	private String pro1;
	private Short studentcount;
	private Timestamp times;

	// Constructors

	/** default constructor */
	public AccpHomework() {
	}

	/** minimal constructor */
	public AccpHomework(Integer tid) {
		this.tid = tid;
	}

	/** full constructor */
	public AccpHomework(Integer tid, AccpClass accpClass,
			AccpSubjectitems accpSubjectitems, Short subcount,
			String unsubname, String pro1, Short studentcount, Timestamp times) {
		this.tid = tid;
		this.accpClass = accpClass;
		this.accpSubjectitems = accpSubjectitems;
		this.subcount = subcount;
		this.unsubname = unsubname;
		this.pro1 = pro1;
		this.studentcount = studentcount;
		this.times = times;
	}

	// Property accessors
	@Id
	@Column(name = "TID", unique = true, nullable = false, precision = 8, scale = 0)
	public Integer getTid() {
		return this.tid;
	}

	public void setTid(Integer tid) {
		this.tid = tid;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "CID")
	public AccpClass getAccpClass() {
		return this.accpClass;
	}

	public void setAccpClass(AccpClass accpClass) {
		this.accpClass = accpClass;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "CHAPTERID")
	public AccpSubjectitems getAccpSubjectitems() {
		return this.accpSubjectitems;
	}

	public void setAccpSubjectitems(AccpSubjectitems accpSubjectitems) {
		this.accpSubjectitems = accpSubjectitems;
	}

	@Column(name = "SUBCOUNT", precision = 3, scale = 0)
	public Short getSubcount() {
		return this.subcount;
	}

	public void setSubcount(Short subcount) {
		this.subcount = subcount;
	}

	@Column(name = "UNSUBNAME")
	public String getUnsubname() {
		return this.unsubname;
	}

	public void setUnsubname(String unsubname) {
		this.unsubname = unsubname;
	}

	@Column(name = "PRO1")
	public String getPro1() {
		return this.pro1;
	}

	public void setPro1(String pro1) {
		this.pro1 = pro1;
	}

	@Column(name = "STUDENTCOUNT", precision = 3, scale = 0)
	public Short getStudentcount() {
		return this.studentcount;
	}

	public void setStudentcount(Short studentcount) {
		this.studentcount = studentcount;
	}

	@Column(name = "TIMES", length = 7)
	public Timestamp getTimes() {
		return this.times;
	}

	public void setTimes(Timestamp times) {
		this.times = times;
	}

}